package spring.demo.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import spring.demo.entity.Teacher;

@Mapper
public interface TeacherMapper {

    @Select("SELECT * FROM TEACHER WHERE TNO = #{id}")
    Teacher findTeacherById(@Param("id") String id);

    @Select("SELECT * FROM TEACHER")
    List<Teacher> listAll();

    @Select("SELECT * FROM TEACHER WHERE TNAME = #{name}")
    List<Teacher> findTeacherByName(@Param("name") String name);
}
